<script setup lang="ts">
import { onMounted, ref } from 'vue'
import type {Person } from '../types/data'

const inputRef = ref<HTMLInputElement | null>(null)

onMounted(() => {
  inputRef.value!.focus()
})

const person = ref<Person>({
  id: 100,
  name: 'jack',
  age: 19
})

console.log(person);
</script>
<template>
  <div>
    <input type="text" ref="inputRef" />
  </div>
</template>
<style lang="less"></style>
